import Cookies from 'js-cookie'

const UserIdKey = 'UserId'
export function setUserId(UserId) {
  return Cookies.set(UserIdKey, UserId)
}
export function getUserId() {
  return Cookies.get(UserIdKey)
}
export function delUserId() {
  return Cookies.remove(UserIdKey)
}

const TokenKey = 'Token'
export function setToken(Token) {
  return Cookies.set(TokenKey, Token)
}
export function getToken() {
  return Cookies.get(TokenKey)
}
export function delToken() {
  return Cookies.remove(TokenKey)
}

const UsernameKey = 'Username'
export function setUsername(username) {
  return Cookies.set(UsernameKey, username)
}
export function getUsername() {
  return Cookies.get(UsernameKey)
}
export function delUsername() {
  return Cookies.remove(UsernameKey)
}

const NicknameKey = 'Nickname'
export function setNickname(nickname) {
  return Cookies.set(NicknameKey, nickname)
}
export function getNickname() {
  return Cookies.get(NicknameKey)
}
export function delNickname() {
  return Cookies.remove(NicknameKey)
}

const AvatarKey = 'Avatar'
export function setAvatar(username) {
  return Cookies.set(AvatarKey, username)
}
export function getAvatar() {
  return Cookies.get(AvatarKey)
}
export function delAvatar() {
  return Cookies.remove(AvatarKey)
}
